<html>
	<head>
		<title>emplist</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="/static/css/style.css" />
	</head>
	<body>
		<div id="wrap">
			<div id="top_content"> 
				<div id="header">
					<div id="rightheader">
						<p>
							2025/7/22
							<br />
						</p>
					</div>
					<div id="topheader">
						<h1 id="title">
							<a href="#">main</a>
						</h1>
					</div>
					<div id="navigation">
					</div>
				</div>
				<div id="content">
					<p id="whereami">
					</p>
					<h1>
						Welcome!
					</h1>
					<table class="table">
						<tr class="table_header">
							<td>
								ID
							</td>
							<td>
								Name
							</td>
							<td>
								Salary
							</td>
							<td>
								job
							</td>
							<td>
								Operation
							</td>							
						</tr>

                        {% for i in  emps %}
                            {% if i.status == 1 %}
                            {% if forloop.counter|divisibleby:"2" %}
                                <tr class="row1">
                            {% else %}
                                <tr class="row2">
                            {% endif %}
                                <td>{{ i.id }}</td>
                                <td>{{ i.name }}</td>
                                <td>{{ i.salary }}</td>
                                <td>{{ i.job }}</td>
                                <td><a href="{% url 'delEmp' i.id %}" >delete emp</a>&nbsp;<a href="{% url 'updateEmp' i.id %}">update emp</a></td>
                            </tr>
                            {% endif %}
                        {% endfor %}
						
					</table>
					<p>
						<input type="button" class="button" value="Add Employee" onclick="location='{% url "addEmp" %}'"/>
					</p>
				</div>
			</div>
			<div id="footer">
				<div id="footer_bg">
				ABC@126.com
				</div>
			</div>
		</div>
	</body>
</html>
